<template>
  <div>
      <mc-style ref="mcStyle" :model="data" @change="changeStyle"></mc-style>
      <div>{{test['a-1']}}</div>
      <el-button @click="print">打印</el-button>
      <el-button @click="change">变更</el-button>
  </div>
</template>

<script>
import McStyle from './components/McStyle'
export default {
    data(){
      return {
           data:{color:"#F41B1B",'border-color':"rgb(255, 0, 0) rgb(4, 4, 4)",'background-image': 'url(&quot;/youyaboot-admin/upload/e78bb943-0122-4b2d-b089-de3769b65d35.png?__mc&quot;)'},
           test:{},
           i:0
	   }
    },
    components:{
      McStyle,
    },

    methods:{
        changeStyle(val){
            // console.log(val)
        },
        print(){
            console.log(JSON.stringify(this.data))
        },
        saveData(val){
            console.log(val);
        },
        change(){
            // data.color="red"
            // this.$refs.mcStyle.innerChangeNotOutChange({color:'#F41B1B'})
            this.$set(this.test,'a-1',this.i++)
            // this.test['a-1']="111"
        }
    }
}
</script>

<style>

</style>
